﻿using SlamDunk.MES.Domain.IRepositories.Interfaces.AcquisitionContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.ConfigurationContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.DefinitionContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.ExecutionContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.FoundationContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.MaintenanceContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.PlanContxt;
using SlamDunk.MES.Domain.IRepositories.Interfaces.QualityContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.ResourceContext;
using SlamDunk.MES.Domain.IRepositories.Interfaces.StockContext;

namespace SlamDunk.MES.Domain.Mediators
{
    /// <summary>
    /// 仓储中介者
    /// </summary>
    public sealed class RepositoryMediator
    {
        #region # 依赖注入构造器

        /// <summary>
        /// 依赖注入构造器
        /// </summary>
        public RepositoryMediator(ITerminalRepository terminalRep, IHardwareRepository hardwareRep, IHardwareConnectionRepository hardwareConnectionRep, IUserExtensionRepository userExtensionRep, IUserRelatedTerminalRepository userRelatedTerminalRep, IUserRelatedProcessSegmentRepository userRelatedProcessSegmentRep, IUserRelatedStorageLocationRepository userRelatedStorageLocationRep, INotificationRepository notificationRep, IFacilityRepository facilityRep, IMeasureUnitGroupRepository measureUnitGroupRep, IMeasureUnitRepository measureUnitRep, IWorkStationRepository workStationRep, IPersonClassRepository personClassRep, IPersonRepository personRep, ITeamRepository teamRep, ITeamMemberRepository teamMemberRep, IEquipmentClassRepository equipmentClassRep, IEquipmentRepository equipmentRep, IMaterialClassRepository materialClassRep, IMaterialRepository materialRep, IEnterpriseRepository enterpriseRep, IBomRepository bomRep, IBomItemRepository bomItemRep, IProcessClassRepository processClassRep, IProcessRepository processRep, IProcessSegmentRepository processSegmentRep, ISegmentPersonRuleRepository segmentPersonRuleRep, ISegmentEquipmentRuleRepository segmentEquipmentRuleRep, ISegmentMaterialRuleRepository segmentMaterialRuleRep, ISegmentParameterRuleRepository segmentParameterRuleRep, IMaterialLotRepository materialLotRep, IMaterialBarcodeRepository materialBarcodeRep, IStockSettlementRepository stockSettlementRep, IBoundRecordRepository boundRecordRep, IStockOrderClassRepository stockOrderClassRep, IStockOrderRepository stockOrderRep, IStockOrderDetailRepository stockOrderDetailRep, ISaleOrderRepository saleOrderRep, ISaleOrderDetailRepository saleOrderDetailRep, IProductionPlanRepository productionPlanRep, IProductionMaterialAskRepository productionMaterialAskRep, IExecutionPlanRepository executionPlanRep, IExecutionMaterialAskRepository executionMaterialAskRep, IWorkOrderRepository workOrderRep, IWorkOrderPersonAskRepository workOrderPersonAskRep, IWorkOrderEquipmentAskRepository workOrderEquipmentAskRep, IWorkOrderMaterialAskRepository workOrderMaterialAskRep, IWorkOrderParameterAskRepository workOrderParameterAskRep, IWorkOrderActualPersonRepository workOrderActualPersonRep, IWorkOrderActualEquipmentRepository workOrderActualEquipmentRep, IWorkOrderActualMaterialRepository workOrderActualMaterialRep, IWorkOrderActualParameterRepository workOrderActualParameterRep, IQualityInspectionRepository qualityInspectionRep, IQualityInspectionDetailRepository qualityInspectionDetailRep, IEquipmentAssetRepository equipmentAssetRep, IEquipmentMaintainClassRepository equipmentMaintainClassRep, IEquipmentMaintenanceRepository equipmentMaintenanceRep, IAcquisitionRuleRepository acquisitionRuleRep, IAcquisitionRuleItemRepository acquisitionRuleItemRep, IAcquisitionSessionRepository acquisitionSessionRep, IAcquisitionRecordRepository acquisitionRecordRep)
        {
            this.TerminalRep = terminalRep;
            this.HardwareRep = hardwareRep;
            this.HardwareConnectionRep = hardwareConnectionRep;
            this.UserExtensionRep = userExtensionRep;
            this.UserRelatedTerminalRep = userRelatedTerminalRep;
            this.UserRelatedProcessSegmentRep = userRelatedProcessSegmentRep;
            this.UserRelatedStorageLocationRep = userRelatedStorageLocationRep;
            this.NotificationRep = notificationRep;
            this.FacilityRep = facilityRep;
            this.MeasureUnitGroupRep = measureUnitGroupRep;
            this.MeasureUnitRep = measureUnitRep;
            this.WorkStationRep = workStationRep;
            this.PersonClassRep = personClassRep;
            this.PersonRep = personRep;
            this.TeamRep = teamRep;
            this.TeamMemberRep = teamMemberRep;
            this.EquipmentClassRep = equipmentClassRep;
            this.EquipmentRep = equipmentRep;
            this.MaterialClassRep = materialClassRep;
            this.MaterialRep = materialRep;
            this.EnterpriseRep = enterpriseRep;
            this.BomRep = bomRep;
            this.BomItemRep = bomItemRep;
            this.ProcessClassRep = processClassRep;
            this.ProcessRep = processRep;
            this.ProcessSegmentRep = processSegmentRep;
            this.SegmentPersonRuleRep = segmentPersonRuleRep;
            this.SegmentEquipmentRuleRep = segmentEquipmentRuleRep;
            this.SegmentMaterialRuleRep = segmentMaterialRuleRep;
            this.SegmentParameterRuleRep = segmentParameterRuleRep;
            this.MaterialLotRep = materialLotRep;
            this.MaterialBarcodeRep = materialBarcodeRep;
            this.StockSettlementRep = stockSettlementRep;
            this.BoundRecordRep = boundRecordRep;
            this.StockOrderClassRep = stockOrderClassRep;
            this.StockOrderRep = stockOrderRep;
            this.StockOrderDetailRep = stockOrderDetailRep;
            this.SaleOrderRep = saleOrderRep;
            this.SaleOrderDetailRep = saleOrderDetailRep;
            this.ProductionPlanRep = productionPlanRep;
            this.ProductionMaterialAskRep = productionMaterialAskRep;
            this.ExecutionPlanRep = executionPlanRep;
            this.ExecutionMaterialAskRep = executionMaterialAskRep;
            this.WorkOrderRep = workOrderRep;
            this.WorkOrderPersonAskRep = workOrderPersonAskRep;
            this.WorkOrderEquipmentAskRep = workOrderEquipmentAskRep;
            this.WorkOrderMaterialAskRep = workOrderMaterialAskRep;
            this.WorkOrderParameterAskRep = workOrderParameterAskRep;
            this.WorkOrderActualPersonRep = workOrderActualPersonRep;
            this.WorkOrderActualEquipmentRep = workOrderActualEquipmentRep;
            this.WorkOrderActualMaterialRep = workOrderActualMaterialRep;
            this.WorkOrderActualParameterRep = workOrderActualParameterRep;
            this.QualityInspectionRep = qualityInspectionRep;
            this.QualityInspectionDetailRep = qualityInspectionDetailRep;
            this.EquipmentAssetRep = equipmentAssetRep;
            this.EquipmentMaintainClassRep = equipmentMaintainClassRep;
            this.EquipmentMaintenanceRep = equipmentMaintenanceRep;
            this.AcquisitionRuleRep = acquisitionRuleRep;
            this.AcquisitionRuleItemRep = acquisitionRuleItemRep;
            this.AcquisitionSessionRep = acquisitionSessionRep;
            this.AcquisitionRecordRep = acquisitionRecordRep;
        }

        #endregion

        #region # 属性

        #region /******ConfigurationContext******/

        /// <summary>
        /// 终端仓储接口
        /// </summary>
        public ITerminalRepository TerminalRep { get; private set; }

        /// <summary>
        /// 硬件仓储接口
        /// </summary>
        public IHardwareRepository HardwareRep { get; private set; }

        /// <summary>
        /// 硬件连接仓储接口
        /// </summary>
        public IHardwareConnectionRepository HardwareConnectionRep { get; private set; }

        /// <summary>
        /// 用户扩展仓储接口
        /// </summary>
        public IUserExtensionRepository UserExtensionRep { get; private set; }

        /// <summary>
        /// 用户相关终端仓储接口
        /// </summary>
        public IUserRelatedTerminalRepository UserRelatedTerminalRep { get; private set; }

        /// <summary>
        /// 用户相关工艺段仓储接口
        /// </summary>
        public IUserRelatedProcessSegmentRepository UserRelatedProcessSegmentRep { get; private set; }

        /// <summary>
        /// 用户相关储存位置仓储接口
        /// </summary>
        public IUserRelatedStorageLocationRepository UserRelatedStorageLocationRep { get; private set; }

        /// <summary>
        /// 工作通知仓储接口
        /// </summary>
        public INotificationRepository NotificationRep { get; private set; }

        #endregion 

        #region /******FoundationContext******/

        /// <summary>
        /// 工厂模型仓储接口
        /// </summary>
        public IFacilityRepository FacilityRep { get; private set; }

        /// <summary>
        /// 计量单位组仓储接口
        /// </summary>
        public IMeasureUnitGroupRepository MeasureUnitGroupRep { get; private set; }

        /// <summary>
        /// 计量单位仓储接口
        /// </summary>
        public IMeasureUnitRepository MeasureUnitRep { get; private set; }

        /// <summary>
        /// 工厂模型仓储接口
        /// </summary>
        public IWorkStationRepository WorkStationRep { get; private set; }

        #endregion

        #region /******ResourceContext******/

        /// <summary>
        /// 人员类仓储接口
        /// </summary>
        public IPersonClassRepository PersonClassRep { get; private set; }

        /// <summary>
        /// 人员仓储接口
        /// </summary>
        public IPersonRepository PersonRep { get; private set; }

        /// <summary>
        /// 班组仓储接口
        /// </summary>
        public ITeamRepository TeamRep { get; private set; }

        /// <summary>
        /// 班组成员仓储接口
        /// </summary>
        public ITeamMemberRepository TeamMemberRep { get; private set; }

        /// <summary>
        /// 设备类仓储接口
        /// </summary>
        public IEquipmentClassRepository EquipmentClassRep { get; private set; }

        /// <summary>
        /// 设备仓储接口
        /// </summary>
        public IEquipmentRepository EquipmentRep { get; private set; }

        /// <summary>
        /// 物料类仓储接口
        /// </summary>
        public IMaterialClassRepository MaterialClassRep { get; private set; }

        /// <summary>
        /// 物料定义仓储接口
        /// </summary>
        public IMaterialRepository MaterialRep { get; private set; }

        /// <summary>
        /// 企业仓储接口
        /// </summary>
        public IEnterpriseRepository EnterpriseRep { get; private set; }

        #endregion

        #region /******DefinitionContext******/

        /// <summary>
        /// 物料清单仓储接口
        /// </summary>
        public IBomRepository BomRep { get; private set; }

        /// <summary>
        /// 物料清单项仓储接口
        /// </summary>
        public IBomItemRepository BomItemRep { get; private set; }

        /// <summary>
        /// 工艺类仓储接口
        /// </summary>
        public IProcessClassRepository ProcessClassRep { get; private set; }

        /// <summary>
        /// 工艺仓储接口
        /// </summary>
        public IProcessRepository ProcessRep { get; private set; }

        /// <summary>
        /// 工艺段仓储接口
        /// </summary>
        public IProcessSegmentRepository ProcessSegmentRep { get; private set; }

        /// <summary>
        /// 工艺段人员规范仓储接口
        /// </summary>
        public ISegmentPersonRuleRepository SegmentPersonRuleRep { get; private set; }

        /// <summary>
        /// 工艺段设备规范仓储接口
        /// </summary>
        public ISegmentEquipmentRuleRepository SegmentEquipmentRuleRep { get; private set; }

        /// <summary>
        /// 工艺段物料规范仓储接口
        /// </summary>
        public ISegmentMaterialRuleRepository SegmentMaterialRuleRep { get; private set; }

        /// <summary>
        /// 工艺段参数规范仓储接口
        /// </summary>
        public ISegmentParameterRuleRepository SegmentParameterRuleRep { get; private set; }

        #endregion

        #region /******StockContext******/

        /// <summary>
        /// 物料批次仓储接口
        /// </summary>
        public IMaterialLotRepository MaterialLotRep { get; private set; }

        /// <summary>
        /// 物料条码仓储接口
        /// </summary>
        public IMaterialBarcodeRepository MaterialBarcodeRep { get; private set; }

        /// <summary>
        /// 库存结转记录仓储接口
        /// </summary>
        public IStockSettlementRepository StockSettlementRep { get; private set; }

        /// <summary>
        /// 出/入库记录仓储接口
        /// </summary>
        public IBoundRecordRepository BoundRecordRep { get; private set; }

        /// <summary>
        /// 库存单据类仓储接口
        /// </summary>
        public IStockOrderClassRepository StockOrderClassRep { get; private set; }

        /// <summary>
        /// 库存单据仓储接口
        /// </summary>
        public IStockOrderRepository StockOrderRep { get; private set; }

        /// <summary>
        /// 库存单据明细仓储接口
        /// </summary>
        public IStockOrderDetailRepository StockOrderDetailRep { get; private set; }

        #endregion

        #region /******PlanContext******/

        /// <summary>
        /// 销售订单仓储接口
        /// </summary>
        public ISaleOrderRepository SaleOrderRep { get; private set; }

        /// <summary>
        /// 销售订单明细仓储接口
        /// </summary>
        public ISaleOrderDetailRepository SaleOrderDetailRep { get; private set; }

        /// <summary>
        /// 生产计划仓储接口
        /// </summary>
        public IProductionPlanRepository ProductionPlanRep { get; private set; }

        /// <summary>
        /// 生产物料需求仓储接口
        /// </summary>
        public IProductionMaterialAskRepository ProductionMaterialAskRep { get; private set; }

        /// <summary>
        /// 作业计划仓储接口
        /// </summary>
        public IExecutionPlanRepository ExecutionPlanRep { get; private set; }

        /// <summary>
        /// 作业物料需求仓储接口
        /// </summary>
        public IExecutionMaterialAskRepository ExecutionMaterialAskRep { get; private set; }

        #endregion

        #region /******ExecutionContext******/

        /// <summary>
        /// 工单仓储接口
        /// </summary>
        public IWorkOrderRepository WorkOrderRep { get; private set; }

        /// <summary>
        /// 工单人员要求仓储接口
        /// </summary>
        public IWorkOrderPersonAskRepository WorkOrderPersonAskRep { get; private set; }

        /// <summary>
        /// 工单设备要求仓储接口
        /// </summary>
        public IWorkOrderEquipmentAskRepository WorkOrderEquipmentAskRep { get; private set; }

        /// <summary>
        /// 工单物料要求仓储接口
        /// </summary>
        public IWorkOrderMaterialAskRepository WorkOrderMaterialAskRep { get; private set; }

        /// <summary>
        /// 工单参数要求仓储接口
        /// </summary>
        public IWorkOrderParameterAskRepository WorkOrderParameterAskRep { get; private set; }

        /// <summary>
        /// 工单实际人员仓储接口
        /// </summary>
        public IWorkOrderActualPersonRepository WorkOrderActualPersonRep { get; private set; }

        /// <summary>
        /// 工单实际设备仓储接口
        /// </summary>
        public IWorkOrderActualEquipmentRepository WorkOrderActualEquipmentRep { get; private set; }

        /// <summary>
        /// 工单实际物料仓储接口
        /// </summary>
        public IWorkOrderActualMaterialRepository WorkOrderActualMaterialRep { get; private set; }

        /// <summary>
        /// 工单实际参数仓储接口
        /// </summary>
        public IWorkOrderActualParameterRepository WorkOrderActualParameterRep { get; private set; }

        #endregion

        #region /******QualityContext******/

        /// <summary>
        /// 质量检查仓储接口
        /// </summary>
        public IQualityInspectionRepository QualityInspectionRep { get; private set; }

        /// <summary>
        /// 质量检查明细仓储接口
        /// </summary>
        public IQualityInspectionDetailRepository QualityInspectionDetailRep { get; private set; }

        #endregion

        #region /******MaintenanceContext******/

        /// <summary>
        /// 设备资产仓储接口
        /// </summary>
        public IEquipmentAssetRepository EquipmentAssetRep { get; private set; }

        /// <summary>
        /// 设备维护类仓储接口
        /// </summary>
        public IEquipmentMaintainClassRepository EquipmentMaintainClassRep { get; private set; }

        /// <summary>
        /// 设备维护记录仓储接口
        /// </summary>
        public IEquipmentMaintenanceRepository EquipmentMaintenanceRep { get; private set; }

        #endregion

        #region /******AcquisitionContext******/

        /// <summary>
        /// 采集规则仓储接口
        /// </summary>
        public IAcquisitionRuleRepository AcquisitionRuleRep { get; private set; }

        /// <summary>
        /// 采集规则项仓储接口
        /// </summary>
        public IAcquisitionRuleItemRepository AcquisitionRuleItemRep { get; private set; }

        /// <summary>
        /// 采集会话仓储接口
        /// </summary>
        public IAcquisitionSessionRepository AcquisitionSessionRep { get; private set; }

        /// <summary>
        /// 采集记录仓储接口
        /// </summary>
        public IAcquisitionRecordRepository AcquisitionRecordRep { get; private set; }

        #endregion

        #endregion
    }
}
